package com.example.learn.hwod;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringJoiner;

public class _32寻找接口成功率最优时段 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int minAverageLost = Integer.parseInt(sc.nextLine());
        int[] nums = Arrays.stream(sc.nextLine().split(" ")).mapToInt(Integer::parseInt).toArray();

        System.out.println(getResult(nums, minAverageLost));
    }

    public static String getResult(int[] nums, int minAverageLost) {
        int n = nums.length;

        int[] preSum = new int[n + 1];  
        for (int i = 1; i <= n; i++) {
            preSum[i] = preSum[i - 1] + nums[i - 1];
        }
        ArrayList<int[]> ans = new ArrayList<>();
        int maxLen = 0;
        for (int i = 0; i < n; i++) {
            for (int j = i+1; j <= n; j++) {
                int sum = preSum[j] - preSum[i];
                int len = j - i;
                int lost = len*minAverageLost;
                if (sum<=lost) {
                    if (len>maxLen){
                        ans = new ArrayList<>();
                    }else if (len==maxLen){
                        ans.add(new int[]{i, j});
                    }
                }
            }
        }
        StringJoiner joiner = new StringJoiner(" ");
        return joiner.toString();


    }

}
